import { SportsType } from '@/enums'

export const getSportsIcon = (type: SportsType | undefined) => {
	switch (type) {
		case SportsType.football:
			return 'football'
		case SportsType.basketball:
			return 'basketball'
		case SportsType.tennis:
			return 'tennis'
		case SportsType.badminton:
			return 'badminton'
		case SportsType.fifa24:
			return 'fifa24'
		case SportsType.nba2k:
			return 'nba2k'
	}
}

export const getSportsCode = (type: SportsType | undefined) => {
	switch (type) {
		case SportsType.football:
			return 'soccer'
		case SportsType.basketball:
			return 'basketball'
		case SportsType.tennis:
			return 'tennis'
		case SportsType.badminton:
			return 'badminton'
		case SportsType.fifa24:
			return 'fifa'
		case SportsType.nba2k:
			return 'nba2k'
	}
}

export const getSportsTypeByCode = (code: string) => {
	switch (code) {
		case 'soccer':
			return SportsType.football
		case 'basketball':
			return SportsType.basketball
		case 'tennis':
			return SportsType.tennis
		case 'badminton':
			return SportsType.badminton
		case 'fifa':
			return SportsType.fifa24
		case 'nba2k':
			return SportsType.nba2k
	}
}
